home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / dev / debug / ggdebug.lha / ppcinline / ggdebug.h
Encoding:
C/C++ Source or Header  |  1999-03-11  |  2.0 KB  |  66 lines

  1. /* Automatically generated header! Do not edit! */
  2.  
  3. #ifndef _PPCINLINE_GGDEBUG_H
  4. #define _PPCINLINE_GGDEBUG_H
  5.  
  6. #ifndef __PPCINLINE_MACROS_H
  7. #include <powerup/ppcinline/macros.h>
  8. #endif /* !__PPCINLINE_MACROS_H */
  9.  
  10. #ifndef GGDEBUG_BASE_NAME
  11. #define GGDEBUG_BASE_NAME GGDebugBase
  12. #endif /* !GGDEBUG_BASE_NAME */
  13.  
  14. #define KCmpStr(string1, string2) \
  15.     LP2(0x1e, LONG, KCmpStr, STRPTR, string1, a0, STRPTR, string2, a1, \
  16.     , GGDEBUG_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
  17.  
  18. #define KDoFmt(formatString, datastream, putChProc, putChData) \
  19.     LP4FP(0x24, APTR, KDoFmt, STRPTR, formatString, a0, STRPTR, datastream, a1, __fpt, putChProc, a2, APTR, putChData, a3, \
  20.     , GGDEBUG_BASE_NAME, void (*__fpt)(), IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
  21.  
  22. #define KGetChar() \
  23.     LP0(0x2a, LONG, KGetChar, \
  24.     , GGDEBUG_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
  25.  
  26. #define KMayGetChar() \
  27.     LP0(0x30, LONG, KMayGetChar, \
  28.     , GGDEBUG_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
  29.  
  30. #define KPutChar(character) \
  31.     LP1(0x36, LONG, KPutChar, LONG, character, d0, \
  32.     , GGDEBUG_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
  33.  
  34. #define KPutStr(string) \
  35.     LP1NR(0x3c, KPutStr, STRPTR, string, a0, \
  36.     , GGDEBUG_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
  37.  
  38. #define VKPrintf(format, data) \
  39.     LP2(0x42, APTR, VKPrintf, STRPTR, format, a0, APTR, data, a1, \
  40.     , GGDEBUG_BASE_NAME, IF_CACHEFLUSHALL, NULL, 0, IF_CACHEFLUSHALL, NULL, 0)
  41.  
  42. #define KPrintf _KPrintf
  43.  
  44. static LONG _KPrintf(STRPTR format, ...)
  45. {
  46.     va_list ap;
  47.     struct Caos MyCaos;
  48.     char buffer[256];
  49.  
  50.     va_start(ap,format);
  51.     vsprintf(buffer,format,ap);
  52.     va_end(ap);
  53.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  54. //    MyCaos.M68kStart    =    NULL;
  55. //    MyCaos.M68kSize        =    0;
  56.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  57. //    MyCaos.PPCStart        =    NULL;
  58. //    MyCaos.PPCSize        =    0;
  59.     MyCaos.a0        =(ULONG) buffer;
  60.     MyCaos.caos_Un.Offset    =    (-60);
  61.     MyCaos.a6        =(ULONG) GGDebugBase;    
  62.     return (LONG)PPCCallOS(&MyCaos);
  63. }
  64.  
  65. #endif /* !_PPCINLINE_GGDEBUG_H */
  66.